Control method for bar material feeder of NC lathe and NC lathe

ABSTRACT

Provided is a method of controlling a bar supplying apparatus capable of automatically setting a timing of opening a run-out preventing chuck, a timing of cutting a bar short, and a timing of replacing the bar by the minimum input work. 
     A controller  115  of an NC lathe  110  extracts length data (1) of a product and dimensional data (s) of a cutting width from a machining program, calculates the position of a feeder  123  on the basis of those data, and controls supply of a bar W to bar supporting units  128   a  to  128   c , opening/closing of run-out preventing chucks  129   a  to  129   d , and feeding and replacement of the bar W on the basis of the position of the feeder  123.

TECHNICAL FIELD

The present invention relates to a method of controlling a bar supplyingapparatus provided for a numerically controlled lathe, for continuouslymachining products while feeding a long bar on a predetermined lengthunit basis through a through hole in a main spindle.

BACKGROUND ART

A bar supplying apparatus for supplying a long bar through a throughhole formed on the axis of a main spindle of a numerically controlledlathe (hereinbelow, described as NC lathe) is known. The bar supplyingapparatus can continuously machine a plurality of products from a singlebar by repeating a process of allowing the tip of the bar project by apredetermined length from a guide bush provided on the axis or in frontof the main spindle, machining the tip of the bar with a tool attachedto a tool post, cutting off a product from the tip of the bar by acutting-off tool, feeding the bar by a predetermined length, andsimilarly machining the tip of the bar.

FIG. 9 shows the configuration of a conventional NC lathe having such abar supplying apparatus.

As shown in the diagram, an NC lathe 110 has a headstock 113 which canmove forward and backward in the same direction as the Z axis, a mainspindle 112 rotatably supported by the headstock 113, in which a throughhole 112 a into which a bar W is inserted along a main spindle axis C isformed, a chuck 117 for holding the bar W, provided at the tip of themain spindle 112, a guide bush 116 provided in front of the headstock113 (in the left part of FIG. 9), for rotatably supporting the tip ofthe bar W, and a tool post 114 to which a plurality of tools T areattached.

The tools T attached to the tool post 114 include not only a singlepoint tool for machining the tip of the bar W projected from the guidebush 116 but also a cutting-off tool for cutting off a product formed atthe tip of the bar W, and a positioning tool for positioning the bar Won the main spindle axis C by making the tip of the bar W fed from a barsupplying apparatus 120 to be described next come into contact with thetool.

An NC apparatus 115 of the NC lathe 110 controls travel of the headstock113 and the tool post 114 in accordance with a machining program.

The bar supplying apparatus 120 for feeding the bar W to the NC lathe110 is disposed rearward of the NC lathe 110 (in the right part of FIG.9).

The bar supplying apparatus 120 has a not-illustrated bar housing forhousing a plurality of bars W, a plurality of bar supporting units 128a, 128 b, and 128 c each for placing the bar W supplied from the barhousing on the main spindle axis C, and run-out preventing chucks 129 a,129 b, and 129 c provided for the bar supporting units 128 a, 128 b, and128 c, respectively, each for holding some midpoint of the bar W so thatthe long bar W is not bent at the time of machining the tip of the barW. A similar run-out preventing chuck 129 d is also provided on the rearend side of the main spindle 112 of the NC lathe 110.

In the rear part of the bar supplying apparatus 120, a feeder 123 forfeeding the bar W placed on the bar supporting units 128 a, 128 b, and128 c toward the main spindle 112 is provided. At the tip of the feeder123, a finger chuck 123 a which holds the rear end of the bar W androtates with the bar W is provided.

The feeder 123 is moved forward/backward in the main spindle axis Cdirection by a driving unit 121 constructed by a motor 121 a, a pulley121 b rotated by the driving of the motor 121 a, and a belt 121 crunning around the pulley 121 b.

Supply of the bar W from the bar housing, opening/closing of the run-outpreventing chucks 129 a, 129 b, 129 c, and 129 d, and driving of themotor 121 a are controlled by a control unit 125 provided for the barsupplying apparatus 120.

In the bar supplying apparatus 120 having the above configuration, it isnecessary to prevent interference between the feeder 123 and the run-outpreventing chucks 129 a, 129 b, 129 c, and 129 d at the time of feedingthe bar W to the main spindle 112 and during the bar W is machined.

For this purpose, before automatic machining is started, the operatormanually feeds the feeder 123 in the main spindle axis C direction toposition the tip of the feeder 123 at the position 1, 2, 3, or 4 (referto FIG. 9) before the run-out preventing chuck 129 a, 129 b, 129 c, or129 d, respectively. The position of the feeder 123 at this time isstored in the control unit 125. When the feeder 123 is positioned at theposition 1, 2, 3, or 4, the run-out preventing chuck 129 a, 129 b, 129c, or 129 d corresponding to the position is set to be open.

Also, with respect to a timing of cutting the bar W short (which denotescutting off of the tip portion of the bar having low machine accuracy atthe start of machining on the supplied bar) and a timing of replacingthe bar W, before the automatic machining is started, the feeder 123 ismanually fed so that the tip of the feeder 123 is positioned in thetiming position, and the position of the feeder 123 at this time isstored in a memory or the like of the control unit 125.

The flowchart of FIG. 10 shows the procedure of the above-describedsettings.

At the stage of setting before automatic machining is started, settingis started (step S100) and, simultaneously, a machining program isloaded to the NC apparatus 115 (step 101), and the number of products tobe machined and the length of a bar are input (steps S102 and S103). Afeed torque according to the length and diameter of the bar W is inputto the control unit 125 of the bar supplying apparatus 120 (step S104).

Subsequently, a timing of opening the run-out preventing chucks 129 a to129 d is input to the control unit 125 (step S105). As described above,the timing is input by manually feeding the feeder 123 to any of thepositions 1 to 4 and inputting the coordinates of the feeder 123 at thistime or the like. The positions 1 to 4 have to be determined inconsideration of the maximum stroke of the headstock 113 duringmachining.

Similarly, the positions of the feeder 123 at the timing of replacingthe bar W and timing of cutting the tip short are input to the controlunit 125 (step 106).

Subsequently, data indicating whether the lengths of the bars W housedin the not illustrated bar housing are the same or not is entered (stepS107).

After completion of the inputting operations, data setting is made,input values are stored in the NC apparatus 115 or the memory in thecontrol unit 125 (step S108), and automatic machining is started (stepS109).

However, in the conventional bar supplying apparatus 120, the operatorhas to manually feed the feeder 123 to one of the positions 1 to 4 andenter the coordinates or the like of the feeder 123 in the correspondingposition to the control unit 125. Consequently, the work is troublesomeand, moreover, there is a problem that long time is required since thebar W is set initially until the automatic machining starts.

The positions 1 to 4 which are set to prevent interference between therun-out preventing chucks 129 a to 129 d and the feeder 123 have to bedetermined in consideration of the maximum stroke of the headstock 113at the time of machining the bar W. The operator has to determine thestoke on the basis of the length of a product and the machining program.It is consequently feared that, due to an improper determination, anunexpected situation such that the feeder 123 collides with the run-outpreventing chucks 129 a to 129 d during machining or at the time offeeding the bar W arises.

The invention has been achieved in consideration of the problems and isto provide a method of controlling a bar supplying apparatus and anumerically controlled lathe which can realize automatic setting of thetiming of opening a run-out preventing chuck, the timing of cutting abar short, and the timing of replacing a bar by the minimum inputtingwork, shortened inputting and setting time, lessened work burden on theoperator, and shortened machining time.

DISCLOSURE OF INVENTION

To solve the problems, the present invention provides a method ofcontrolling a bar supplying apparatus provided for a numericallycontrolled lathe including: a headstock; a main spindle rotatablysupported by the headstock and in which a through hole is formed alongan axis; a tool post to which a tool for machining a bar projected fromthe main spindle through the through hole is attached; and a controllerfor controlling travel of the headstock or the tool post, and the barsupplying apparatus having a feeder for feeding the bar placed on a barsupporting unit toward the main spindle on a predetermined length unitbasis, and a run-out preventing chuck for holding the bar supported onthe axis by the bar supporting unit so as not to be run out to the side,wherein position data of the run-out preventing chuck, length data ofthe bar, length data in the axial direction of a product obtained bymachining the bar, and dimensional data of cutting width for cutting theproduct off from the bar are preset in the controller, and thecontroller calculates the position of the feeder when the bar ispositioned and when the bar is machined by feeder position calculatingmeans and, on the basis of the calculated position of the feeder andeach of the preset data, controls supply of the bar to the barsupporting unit, opening/closing of the run-out preventing chuck, andfeeding of the bar.

According to the method, by an instruction of the controller of the NClathe, a bar is supplied from the bar housing to the bar supportingunit. The bar placed on the bar supporting unit is held by the run-outpreventing chuck so as not to be bent during automatic machining andwhen the bar is fed to the main spindle. The controller calculates theposition of the feeder when the bar is positioned and when the bar ismachined by feeder position calculating means and, and opens the run-outpreventing chuck which may interfere with the feeder.

From the length data of a product and the dimensional data of cuttingwidth, how much the bar is consumed by machining one product can beeasily determined. The dimensional data of cutting width can be obtainedfrom, for example, the width of a cutting-off tool. Therefore, bysubtracting the length of the consumed bar from the original length ofthe bar, the length data of the machined bar can be obtained.

The length data of a product and the dimensional data of cutting widthmay be set by manual input of the operator or may be extracted from amachining program for machining a product.

As the feeder position calculating means, a servo mechanism or anencoder may be used. In this case, the position of the feeder can becalculated from the rotation angle of a rotary shaft of a motor, apulley, or the like provided for the driving unit for moving the feeder.

The tip of the bar supported by the bar supporting unit is detected bydetecting means positioned in a predetermined position, and thecontroller determines the position of the tip of the bar from theposition of the feeder at the time when the detecting means detects thetip of the bar, length data of the product extracted from the machiningprogram, and dimensional data of the cutting width, and controls feedingof the bar by the driving unit and opening/closing of the run-outpreventing chuck.

In this manner, by the detecting means positioned in the predeterminedposition for detecting the tip of a bar, without inputting the length ofthe bar by the operator, the length can be automatically determined.Further, from the length of the bar obtained in the above manner and theposition of the feeder detected by the servo mechanism or the like, theposition of the tip of the bar can be easily obtained.

By using the servo motor, the feeder can be moved synchronously withmovement of the bar in association with machining.

The feeder position calculating means is an arithmetic unit provided forthe controller, the tip of the bar fed by the feeder is made come intocontact with a contact member positioned in a predetermined position,thereby positioning the bar, and the arithmetic unit may calculate theposition of the feeder on the basis of position data of the contactmember, length data of the bar, length data of the product, anddimensional data of the cutting width.

According to the method, without using a servo motor or the like, theposition of the feeder when the bar is positioned and when the bar isbeing machined can be obtained.

By making the tip of a bar come into contact with the contact memberpreliminarily positioned, the position of the tip of the feeder can becalculated from the position of the contact member and the length of thebar. By subtracting the length of a product and the width of acutting-off tool from the initial length of the bar, the length of thebar after machining can be derived. From the position of the contactmember and the length of the bar after machining, the movement amount ofthe feeder by the machining of the product can be obtained.

Further, the number of products to be machined may be preliminarilyinput to the controller, and the necessary number of the bars and anexpected length of the remaining bar may be calculated on the basis ofthe number of products to be machined. In this case, whether or not thebar is machined until it is used up may be determined from the expectedlength of the remaining bar calculated on the basis of the number ofproducts to be machined, from the expected length of the remaining barcalculated on the basis of the number of products to be machined.

A plurality of bars of different lengths are housed in a bar housing forhousing the bars, the length data of the bars housed in the bar housingis preliminarily input to the controller, and the bar may be suppliedfrom the bar housing so that expected length of the remaining barbecomes the minimum on the basis of the length data of the product andthe number of products to be machined.

According to the method, the bar can be effectively used, and themachining cost can be reduced.

The object of the invention can be also achieved by a numericallycontrolled lathe having a controller for performing a control accordingto the control method.

Specifically, there is provided a numerically controlled lathecomprising a headstock, a main spindle rotatably supported by theheadstock and in which a through hole is formed along the axis, a toolpost to which a tool is attached, and a controller for controllingtravel of the headstock or the tool post, wherein the tool of the toolpost is provided separately from the numerically controlled lathe, arun-out preventing chuck for holding the bar so as not to be run out tothe sides is provided in a preset position, and a bar supplied from abar supplying apparatus through the through hole in the main spindle ismachined by the tool of the tool post, the bar supplying apparatushaving a feeder for feeding the bar toward the main spindle on apredetermined length unit basis, and the controller has a function ofcalculating the position of the feeder when the bar is positioned andwhen the bar is machined by feeder position calculating means, andcontrolling supply of the bar to the bar supporting unit,opening/closing of the run-out preventing chuck, and feeding of the baron the basis of the calculated position of the feeder, length data inthe axial direction of a preset product, and dimensional data of cuttingwidth for cutting the product from the bar.

According to the invention, only by inputting the number of products tobe machined, the timing of replacing a bar, the timing of cutting a barshort, an amount of feeding a bar, and the timing of opening/closing therun-out preventing chuck can be automatically controlled.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram showing a schematic configuration of main componentsof a numerically controlled lathe having a bar supplying apparatusaccording to a first embodiment of the invention.

FIG. 2 is a flowchart for explaining a method of controlling the barsupplying apparatus and showing a procedure of setting setting valuesbefore automatic machining is started.

FIG. 3 is a flowchart for explaining a method of controlling the barsupplying apparatus and explaining the bar supplying apparatus after theautomatic machining is finished.

FIG. 4 is a diagram showing an example of a setting screen of the barsupplying apparatus displayed on a display of an NC apparatus.

FIG. 5 is a diagram showing the relation of a main spindle and a feederat the time of cutting a bar short.

FIG. 6 is a diagram schematically showing the configuration of maincomponents of a numerically controlled lathe having a bar supplyingapparatus according to a second embodiment of the invention.

FIG. 7 is a flowchart for explaining a method of controlling the barsupplying apparatus and explaining a procedure of controlling the barsupplying apparatus after automatic machining is started.

FIG. 8 is a schematic configuration diagram of main components of anumerically controlled lathe having a bar supplying apparatus, accordingto a third embodiment of the invention.

FIG. 9 is a schematic configuration diagram of main components of anumerically controlled lathe having a bar supplying apparatus, as aprior art of the present invention.

FIG. 10 is a flowchart for explaining a method of controlling aconventional bar supplying apparatus and shows the procedure of settingsetting values before automatic machining is started.

BEST MODE FOR CARRYING OUT THE INVENTION

Preferred embodiments of the invention will be described in detailhereinbelow with reference to the drawings.

First Embodiment

FIG. 1 is a block diagram of a numerically controlled lathe having a barsupplying apparatus, according to a first embodiment of the invention.FIGS. 2 and 3 are flowcharts for explaining a method of controlling thebar supplying apparatus. FIG. 2 shows a procedure of inputting andsetting setting values before automatic machining is started, and FIG. 3is a flowchart for explaining a procedure of controlling the barsupplying apparatus after the automatic machining is started. FIG. 4 isa diagram showing a setup screen displayed on a display at the time ofsetting various setting values in an NC apparatus. FIG. 5 is a diagramshowing the action of a main spindle and a feeder at the time of cuttinga bar short.

First, the configuration of an NC lathe and a bar supplying apparatuswill be described by referring to FIG. 1.

The basic configuration of the NC lathe and the bar supplying apparatusof FIG. 1 is the same as that of the NC lathe and the bar supplyingapparatus shown in FIG. 9, so that the same parts and same members aredesignated by the same reference numerals and the detailed descriptionof the parts and members will not be repeated.

In the invention, the NC apparatus 115 of the NC lathe 110 controlssupply of the bar W in the bar supplying apparatus 120, driving of amotor for moving the feeder 123, and opening/closing of the run-outpreventing chucks 129 a to 129 d.

In the embodiment, the motor for moving the feeder 123 is a servo motor121 a′. Further, description will be given on condition that theheadstock 113 is movable in the Z axis direction and movesforward/backward in accordance with an instruction of the NC apparatus115.

Procedure of Setting Various Setting Values

Referring to FIGS. 1, 2, and 4, the procedure of setting various settingvalues will now be described.

In the NC apparatus 115, an initial position O1 of the headstock 113 atthe start of machining, an origin position O2 of the feeder 123 in thebar supplying apparatus 120, and the positions of run-out preventingchucks 129 a to 129 d are preset.

On start of setting (step S10), a machining program is loaded to the NCapparatus 115 (step S11). The operator enters the number of products tobe machined and the length of the bar W used for the product machiningto the NC apparatus 115 (steps S12 and S13). The operator also enters afeed torque in accordance with the diameter of the bar W or the like(step S14) and enters data indicating whether the lengths of the bars Whoused in a not-illustrated bar housing are the same or not (step S15).

The length of a product and the width of a cutting-off tool as dimensiondata of a width of cutting may be manually entered by the operator instep S13 or can be automatically read from the machining program.

After completion of the inputting operation, data setting is made andinput values are stored in a memory in the NC apparatus 115 (step S16).On the basis of the set data, the NC apparatus 115 computes the lengthof the bar W consumed by machining one product (which is equal to thesum of the product length and the width of the cutting-off tool), thetiming of opening the run-out preventing chucks 129 a to 29 d, thenumber of necessary bars, the length of the remaining bar W after thenecessary number of products are machined, the number of machining timeswhich can be performed until the bar is used up, the timing of replacingthe bar W, and the like (step S17). The computation results aredisplayed on a setup screen 130 of the display of the NC apparatus 115as shown in FIG. 4 (step S18). The operator can confirm whether thecontents of the settings are correct or not on the setup screen 130.

The operator determines whether the products are machined until the barW is used up on the basis of the number of machining times which can beperformed and is calculated by the NC apparatus 115 (step S19). In thecase where the machining is performed until the bar W is used up, thefinal number of products to be machined is confirmed on the setup screen130 (step S20). After completion of the above, automatic machining isstarted (step S21).

Procedure of Automatic Machining

The procedure of the automatic machining will now be described withreference to FIGS. 1, 3, and 5.

When the automatic machine is started, the NC apparatus 115 outputs aninstruction to take out the bar W from the not-illustrated bar housingand supply it to the bar supporting units 128 a to 128 c (step S31).When the bar W is supplied to the bar supporting units 128 a to 128 c,the run-out preventing chucks 129 a to 129 d are closed to hold the barW (step S32).

Subsequently, the NC apparatus 115 drives the servo motor 121 a′ tostart forward movement of the feeder 123. By the forward movement of thefeeder 123, an end portion of the bar W is grasped by the finger chuck123 a of the feeder 123. After that, the bar W moves together with thefeeder 123 (step S33, refer to FIG. 5A).

The position of the tip of the feeder 123 is determined by the NCapparatus 115 from the rotation angle of the rotary shaft of the servomotor 121 a′. The NC apparatus 115 determines whether or not the feeder123 reaches a position at which any of the preset run-out preventingchucks 129 a to 129 d is open (step S34). When it is determined that thefeeder 123 reaches the open position, the NC apparatus 115 outputs aninstruction to open the run-out preventing chuck corresponding to theopen position (step S35).

The dimensional accuracy and machining accuracy of the tip portion ofthe bar W supplied from the bar housing are often low. Consequently,before the machining on a product is started, the tip portion of the barW having low machining accuracy has to be preliminarily cut off by acutting-off tool. To do this work, the NC apparatus 115 allows thefeeder 123 to travel forward so that the tip of the bar W reaches apreset position in the guide bush 116 (step S36, refer to FIG. 5B).

The tip position of the bar W can be obtained by adding initial lengthL₀ of the bar W to the position of the feeder 123.

When the tip of the bar W reaches the preset position, the NC apparatus115 stops the driving of the servo motor 121 a′, thereby stopping themovement of the feeder 123. The NC apparatus 115 drives chuck 117 of themain spindle 112 so as to grasp the bar W (step S37).

Subsequently, the headstock 113 and the feeder 123 are movedsynchronously (step S38) to make the tip of the bar W project from theguide bush 116 only by a preset length (refer to FIG. 5C). Thecutting-off tool (indicated by reference numeral T1 in FIG. 5) attachedto the tool post 114 cuts off the tip of a work W only by a presetlength (step S39, refer to FIG. 5D). The length of the bar W after thetip is cut off is referred to as L₁. In this step, the tool is notlimited to the cutting-off tool but the tip of the work W may besubjected to end face machining only by a preset length by a tool formachining an end face.

After the procedure is finished, the NC apparatus 115 opens the chuck117, thereby canceling the grasp of the bar W by the chuck 117 (stepS40) and moves the headstock 113 to the initial position O1 at the timeof start of the machining (step S41, refer to FIG. 5E). Since the feeder123 does not move at this time, the position of the bar W is maintainedat the position at which the tip of the bar W was cut off. After theheadstock 113 moves to the initial position O1, the NC apparatus 115drives the chuck 117 so as to grasp the bar W (step S42).

After that, a machining program for machining one product is started(step S43). While synchronously moving the headstock 113 and feeder 123in the Z axis direction, the machining on the bar W with a tool isstarted (step S44, refer to FIG. 5F. In FIG. 5, this tool is indicatedby a reference numeral T2). In a process of moving the headstock 113 andfeeder 123 in the Z axis direction, whether the tip of the feeder 123reaches the open position of any of the preset run-out preventing chucks1129 a, 129 b, 129 c, and 129 d is always monitored (step S45). When thetip of the feeder 123 reaches the open position, the NC apparatus 115outputs an instruction to open the run-out preventing chuckcorresponding to the open position (step S46).

When the headstock 113 and feeder 123 come to a preset position whilesynchronously moving (step S47), whether formation of one product hasbeen finished or not is determined (step S48). If it is not finished,the program returns to step 44, and the machining is continued.

If formation of one product is finished, the product is cut off from thebar W by the cutting-off tool (step S49) and the machining program formachining one product is finished (step S50). The length of the bar W atthis time is equal to a length obtained by subtracting the length “l” ofthe product and the width “s” of the cutting-off tool from the length L₁on start of the machining (the length is indicated by L₂ which isexpressed by the equation of L₂=L₁−(l+s). Hereinbelow, the length of theremaining bar W after “k” products are machined is expressed by L_(k+1)which is similarly L_(k+1)=L_(k)−(l+s)).

The NC apparatus 115 counts the number of machined products anddetermines whether the number reaches the preset number or not (stepS51). When the number of machined products reaches the preset number,the machining is finished (step S52).

If the number of machined products has not reached the preset number,whether the bar W is replaced or not is determined on the basis of thelength L_(k+1) of the remaining bar W (step S53). Whether the bar W isto be replaced or not may be determined by comparing the preset valuewith the length L_(k+1) of the remainder and determining whether thelength L_(k+1) of the remainder is smaller than the preset value or not.When the following product is machined from the product W having thelength of L_(k+1) of the remainder, whether the bar W is replaced or notmay be determined by seeing whether the main spindle 112 and feeder 123interfere with the guide bush 116 and chuck 117.

When it is determined that the bar W does not have to be replaced, theprogram returns to step S40 and machining on the next product isstarted.

When it is determined that the bar W has to be replaced, the headstock113 and feeder 123 are moved backward (step S54), the grasp of the bar Wby the chuck 117 is canceled (step S55), the feeder 123 is further movedbackward and the remaining material is discarded (step S56). After that,the program returns to step S31 and the subsequent steps are repeated.

Second Embodiment

A second embodiment of the invention will now be described by referringto FIGS. 6 and 7.

According to the idea of the present invention, as a motor for movingthe feeder 123, a motor which does not have a servo mechanism or anencoder can be also applied.

In the second embodiment, the motor 121 a for moving the feeder 123 isan ordinary motor which does not have the servo mechanism or the like.To the tool post 114, a tool T for positioning as a contact member withwhich the tip of the bar W supplied is made come into contact, therebypositioning the bar W is attached. As the tool T for positioning, a toolwhich can position the bar W by making the tip of the bar W contact withthe tool is sufficient. Not only a dedicated positioning tool but also atool used for other use such as a cutting-off tool or a cutting tool maybe used.

The procedure of automatic machining in the numerically controlled lathehaving the above configuration will be described with reference to theflowchart of FIG. 7.

When the bar W is supplied from a not-illustrated bar housing to the barsupporting units 128 a to 128 c (step S61), the run-out preventingchucks 129 a to 129 d are closed to grasp the bar W (step S62).

The tool post 114 indexes the tool T for positioning in a predeterminedposition so that the tool T is positioned in a preset position in frontof the guide bush 115 (step S63, refer to FIG. 6). Subsequently, fromthe (preset) length of the bar W supplied and the position of a contactpoint O4 (refer to FIG. 6) at which the tip of the bar W comes intocontact with the tool T, the NC apparatus 115 obtains a movement targetposition O3 of the feeder 123 (step 64). The movement target position O3can be obtained by, as shown in FIG. 6, subtracting the length L of thebar W from the position of the contact point O4.

The NC apparatus 115 determines whether or not any of the run-outpreventing chucks 129 a to 129 d exists in the movement path of thefeeder 123 extending to the movement target position O3 (step S65). Whena run-out preventing chuck which may interfere with the feeder 123during the movement exists, the run-out preventing chuck is opened (stepS66).

After that, the motor 121 a is driven to move the feeder 123 forward. Atthis time, the rear end of the bar W is grasped by the finger chuck 123a of the feeder 123 (step S67).

When the tip of the bar W passes through the main spindle 112 and theguide bush 116 and comes into contact with the tool T for positioning(step S68), the forward travel of the bar W and feeder 123 is regulatedand an overload acts on the motor 121 a. In response to the overload,the NC apparatus 115 stops the motor 121 a and drives the chuck 117 tograsp the bar W (step S69). After that, the tool post 114 indexes thecutting-off tool to a predetermined position.

When the tip of the bar W is made come into contact with the tool T ofpositioning, if the bar W is pushed back from the tool T for positioningby repulsion acting on the bar W and it becomes difficult to preciselyposition the bar W, after the motor 121 a is stopped and before thechuck 117 grasps the bar W, the tool T for positioning is moved to thebar W side to make the bar W come into contact with the tool T so as topush the bar W slightly backward.

Subsequently, the tool T for positioning is escaped from the contactpoint O4 to move the headstock 113 forward by a predetermined amount(step S71) so that the length of the bar W projected from the guide bush116 becomes equal to a preset value. The cutting-off tool attached tothe tool post 114 cuts the tip of the work W only by the preset length(step S72).

After completion of the procedure, the NC apparatus 115 cancels thegrasp of the bar W by the chuck 117 (step S73) and moves the headstock113 to the initial position O1 at the time of start of the machining(step S74). After that, the NC apparatus 115 drives the chuck 117 so asto grasp the bar W (step S75).

Subsequently, a machining program for machining a product is started(step S76). The tip position of the feeder 123 can be obtained by addingthe travel distance of the headstock 113 to the tip position(corresponding to the movement target position O3) of the feeder 123 atthe time when the tip of the bar W comes into contact with the tool Tfor positioning (step S77). While moving the headstock 113 in the Z axisdirection, the machining on the bar W is started (step S78). During themachining on the bar W, the feeder 123 travels in the Z axis directionso as to follow the travel of the bar W in association with the movementof the headstock 113.

During the travel of the feeder 123 in the Z axis direction with the barW, whether or not the tip of the feeder 123 comes to the open positionof any of the preset run-out preventing chucks 129 a to 129 d isdetermined (step S79). When any of the run-out preventing chucks comesto the open position, the NC apparatus 115 outputs an instruction toopen the run-out preventing chuck corresponding to the open position(step S80).

When the headstock 113 and feeder 123 travel and come to the presetposition (step S81), whether formation of one product is finished or notis determined (step S82). If it is not finished, the program returns tostep S77 and the machining is continued.

If the formation of one product is finished, the product is cut off fromthe bar W by the cutting-off tool (step S83). After that, the machiningprogram for machining one product is finished (step S84).

The NC apparatus 115 counts the number of machined products anddetermines whether the number has reached the preset number or not (stepS85). If the number reaches the preset number, the machining is finished(step S86).

If the number has not reached the preset number, whether the bar W isreplaced or not is determined on the basis of the length L_(k+1) of theremaining bar W (step S87).

When it is determined that the bar W does not have to be replaced, theprogram returns to step S73 and starts machining on the followingproduct.

When it is determined that the bar W has to be replaced, the headstock113 and the feeder 123 are moved backward (step S88). The grasp of thebar W by the chuck 117 is canceled (step S89), the feeder 123 is movedfurther backward, and the remained material is discarded (step S90).

Third Embodiment

A third embodiment of the invention will now be described by referringto FIG. 8.

In FIG. 8, the same parts and the same members as those in FIG. 1 of thefirst embodiment are designated by the same reference numerals and theirdetailed description will not be repeated.

In the embodiment, an optoelectronic sensor 119 for detecting the tip ofthe bar W is positioned and provided in front of the run-out preventingchuck 129 c of the bar supplying apparatus 120.

In the embodiment, a motor for moving the feeder 123 is the servo motor121 a′ similar to that of the first embodiment.

When the tip of the bar W crosses in front of the optoelectronic sensor119, a detection signal is transmitted from the optoelectronic sensor119 to the NC apparatus 115. The NC apparatus 115 determines theposition of the feeder 123 at the time point when the detection is inputon the basis of the rotation angle of the rotary shaft of the servomotor 121 a′, and calculates the initial length L₀ of the bar W suppliedto the bar supporting units 128 a to 128 c from the position of thefeeder 123 and the preset position of the optoelectronic sensor 119.

As described above, according to the embodiment, the operator does nothave to enter the accurate length of the bar W, so that the operatordoes not accurately grasp the length of the bar W. Therefore, the burdenon the operator can be further lessened, and the machining time can befurther shortened.

There is also an advantage that occurrence of a trouble due to anerroneous input of the length of the bar W can be prevented.

Further, the length of the bar W can be accurately determined, so thatbars W of different lengths can be supplied at random.

At the time of discarding the bar W as a remainder, by moving the feeder123 backward until the optoelectronic sensor 119 detects the tip of thebar W, the length of the remaining bar W can be known. In such a manner,the bars W can be classified by length of the remainder and housed inthe bar housing.

Although the preferred embodiments of the invention have been described,the invention is not limited to the foregoing embodiments.

For example, in the third embodiment, a sensor for detecting the tip ofthe bar is described as an optoelectronic sensor. However, the inventionis not limited to the optoelectronic sensor but other sensor or switchsuch as a proximity switch may be used as long as the other sensor orswitch can detect passage of the tip of a bar at a certain point.

According to the invention, it is also possible to prepare a pluralityof bars W of different lengths in the bar housing so as to be classifiedand the NC apparatus 115 can obtain a combination of the bars W ofdifferent lengths so that the length of the final remained bar W becomesthe minimum on the basis of the length of the bar W housed in the barhousing, the number of machined products, the length data of theproduct, and the dimensional data of the cutting width.

By supplying the bar W in accordance with the obtained combination,efficient machining with a small remainder to be discarded can beperformed.

According to the invention, the timing of opening the run-out preventingchuck, the timing of cutting the bar short, and the timing of replacingthe bar can be automatically set by the minimum input work. Therefore,input and setting time can be shortened, the work load on the operatoris lessened, and the machining time can be shortened.

Industrial Applicability

The invention can be applied not only to a numerically controlled lathehaving a movable headstock but also to a numerically controlled lathehaving a fixed headstock. The invention can be applied not only to anumerically controlled lathe for cutting a bar with a cutting-off toolbut also to a numerically controlled lathe for cutting a bar with alaser beam, a water jet, a wire-cut electric discharge machining, or thelike.

What is claimed is:
 1. A method of controlling a bar supplying apparatusprovided for a numerically controlled lathe comprising: a headstock; amain spindle rotatably supported by the headstock and in which a throughhole is formed along an axis; a tool post to which a tool for machininga bar projected from said main spindle through said through hole isattached; and a controller for controlling travel of said headstock orsaid tool post, and the bar supplying apparatus having a feeder forfeeding said bar placed on a bar supporting unit toward said mainspindle on a predetermined length unit basis, and a run-out preventingchuck for holding said bar supported on said axis by said bar supportingunit so as not to be run out to the side, characterized in that positiondata of said run-out preventing chuck, length data of said bar, lengthdata in the axial direction of a product obtained by machining said bar,and dimensional data of cutting width for cutting said product off fromsaid bar are preset in said controller, and said controller calculatesthe position of said feeder when said bar is positioned and when saidbar is machined by feeder position calculating means and, on the basisof the calculated position of said feeder and each of said preset data,controls supply of said bar to said bar supporting unit, opening/closingof said run-out preventing chuck, and feeding of said bar.
 2. The methodof controlling the bar supplying apparatus in the numerically controlledlathe according to claim 1, characterized in that said feeder positioncalculating means is a servo mechanism or an encoder provided for adriving unit for driving said feeder, and said controller calculates theposition of said feeder from a rotation angle of a rotary shaft providedfor said driving unit.
 3. The method of controlling the bar supplyingapparatus in the numerically controlled lathe according to claim 2,characterized in that the tip of said bar supported by said barsupporting unit is detected by detecting means positioned in apredetermined position, and said controller determines the position ofthe tip of said bar from the position of said feeder at the time whensaid detecting means detects the tip of said bar, length data of saidproduct extracted from said machining program, and dimensional data ofsaid cutting width, and controls feeding of said bar by said drivingunit and opening/closing of said run-out preventing chuck.
 4. The methodof controlling the bar supplying apparatus in the numerically controlledlathe according to claim 2, characterized in that said feeder is movedsynchronously with movement of said bar in association with maching. 5.The method of controlling the bar supplying apparatus in the numericallycontrolled lathe according to claim 1, characterized in that said feederposition calculating means is an arithmetic unit provided for saidcontroller, the tip of the bar fed by said feeder is made come intocontact with a contact member positioned in a predetermined position,thereby positioning the bar, and said arithmetic unit calculates theposition of said feeder on the basis of position data of said contactmember, length data of said bar, length data of said product, anddimensional data of said cutting width.
 6. The method of controlling thebar supplying apparatus in the numerically controlled lathe according toclaim 1, characterized in that the number of products to be machined ispreliminarily input to said controller, and the necessary number of saidbars and an expected length of said remaining bar are calculated on thebasis of the number of products to be machined.
 7. The method ofcontrolling the bar supplying apparatus in the numerically controlledlathe according to claim 6, characterized in that whether or not saidbar is machined until it is used up is determined from the expectedlength of said remaining bar calculated on the basis of said number ofproducts to be machined.
 8. The method of controlling the bar supplyingapparatus in the numerically controlled lathe according to claim 1,characterized in that a plurality of bars of different lengths arehoused in a bar housing for housing said bars, the length data of saidbars housed in said bar housing is preliminarily input to saidcontroller, and said bar is supplied from said bar housing so thatexpected length of said remaining bar becomes the minimum on the basisof the length data of said product and the number of products to bemachined.
 9. The method of controlling the bar supplying apparatus inthe numerically controlled lathe according to claim 1, characterized inthat the dimensional data of said cutting width is based on the width ofa cutting-off tool.
 10. A numerically controlled lathe comprising aheadstock, a main spindle rotatably supported by the headstock and inwhich a through hole is formed along the axis, a tool post to which atool is attached, and a controller for controlling travel of saidheadstock or said tool post, characterized in that the tool of said toolpost is provided separately from said numerically controlled lathe, arun-out preventing chuck for holding said bar so as not to be run out tothe sides is provided in a preset position, and a bar supplied from abar supplying apparatus through the through hole in said main spindle ismachined by the tool of said tool post, the bar supplying apparatushaving a feeder for feeding said bar toward said main spindle on apredetermined length unit basis, and said controller has a function ofcalculating the position of said feeder when said bar is positioned andwhen said bar is machined by feeder position calculating means, andcontrolling supply of said bar to said bar supporting unit,opening/closing of said run-out preventing chuck, and feeding of saidbar on the basis of the calculated position of said feeder, length datain the axial direction of a preset product, and dimensional data ofcutting width for cutting said product from said bar.
 11. Thenumerically controlled lathe according to claim 10, characterized inthat said feeder position calculating means is a servo mechanism or anencoder provided for a driving unit for moving said feeder, and saidcontroller calculates the position of said feeder on the basis of arotation angle of a rotary shaft provided for said driving unit.
 12. Thenumerically controlled lathe according to claim 10, characterized inthat said feeder position calculating means is an arithmetic unitprovided for said controller, the tip of the bar fed by said feeder ismade come into contact with a contact member positioned in apredetermined position, thereby positioning the bar, and said arithmeticunit calculates the position of said feeder on the basis of positiondata of said contact member, length data of said bar, length data ofsaid product, and dimensional data of said cutting width.
 13. Thenumerically controlled lathe according to claim 10, characterized inthat the dimensional data of said cutting width is based on the width ofa cutting-off tool.